package com.ideaaedi.zoo.example.springboot.flowable.sharding.entity.po;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;

import java.io.Serial;
import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 
 * </p>
 *
 * @author Administrator
 * @since 1.0.0
 */
@Getter
@Setter
@TableName("ACT_HI_PROCINST")
@Schema(name = "ActHiProcinstPO", description = "历史流程实例")
public class ActHiProcinstPO implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    @TableId("ID_")
    @Schema(description = "id")
    private String id;

    @TableField("REV_")
    @Schema(description = "版本号")
    private Integer rev;

    @TableField("PROC_INST_ID_")
    @Schema(description = "流程实例ID")
    private String procInstId;

    @TableField("BUSINESS_KEY_")
    @Schema(description = "业务标识")
    private String businessKey;

    @TableField("PROC_DEF_ID_")
    @Schema(description = "流程定义ID")
    private String procDefId;

    @TableField("START_TIME_")
    @Schema(description = "开始时间")
    private Date startTime;

    @TableField("END_TIME_")
    @Schema(description = "结束时间")
    private Date endTime;

    @TableField("DURATION_")
    @Schema(description = "耗时（毫秒）")
    private Long duration;

    @TableField("START_USER_ID_")
    @Schema(description = "流程发起人ID")
    private String startUserId;

    @TableField("START_ACT_ID_")
    @Schema(description = "开始节点ID")
    private String startActId;

    @TableField("END_ACT_ID_")
    @Schema(description = "结束节点ID")
    private String endActId;

    @TableField("SUPER_PROCESS_INSTANCE_ID_")
    @Schema(description = "父流程实例ID")
    private String superProcessInstanceId;

    @TableField("DELETE_REASON_")
    @Schema(description = "删除原因")
    private String deleteReason;

    @TableField("TENANT_ID_")
    @Schema(description = "租户ID")
    private String tenantId;

    @TableField("NAME_")
    @Schema(description = "名称")
    private String name;

    @TableField("CALLBACK_ID_")
    @Schema(description = "回调ID",
            $comment = "通常是用于标识外部系统中的某个唯一标识符。当流程实例需要与外部系统交互时，可能会使用这个字段来记录回调的标识信息")
    private String callbackId;

    @TableField("CALLBACK_TYPE_")
    @Schema(description = "回调类型")
    private String callbackType;

    @TableField("REFERENCE_ID_")
    @Schema(description = "引用ID", $comment = "它通常用来关联流程实例与外部业务系统中的记录。这样可以在流程实例和外部业务数据之间建立联系")
    private String referenceId;

    @TableField("REFERENCE_TYPE_")
    @Schema(description = "引用类型")
    private String referenceType;

    @TableField("PROPAGATED_STAGE_INST_ID_")
    @Schema(description = "传播阶段实例ID",
            $comment = "在某些高级场景下，如嵌套流程或阶段性的流程执行，这个字段可以用来标识流程中的某个阶段实例是否已经传播到了其他部分或流程")
    private String propagatedStageInstId;

    @TableField("BUSINESS_STATUS_")
    @Schema(description = "业务状态")
    private String businessStatus;
    
    @Schema(description = "日期（yyyy-MM-dd）")
    @TableField("sharding_date")
    private String shardingDate;
}
